package net.xxcxcxcx.xc_enhancedmob.event;

import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.damage.DamageSource;
import net.xxcxcxcx.xc_enhancedmob.skills.Ref;

/**
 * 所有事件触发的接口
 */

public interface CustomEventTrigger {
    //属性技能
    default boolean onAttribute(LivingEntity mobEntity) {
        return true;
    }

    //主动技能
    default boolean onAbilityUse(LivingEntity mobEntity) {
        return true;
    }

    //被动技能
    default boolean passiveApply(LivingEntity mobEntity) {
        return true;
    }

    //治疗时候触发技能,警告不要在治疗里面调用MobEntity.heal()
    default boolean onTreat(LivingEntity mobEntity, Ref<Float> amount) {
        return true;
    }

    //开始攻击时候的技能
    default boolean onStartAttack(LivingEntity attacker, LivingEntity entity) {
        return true;
    }

    //防御技能
    default boolean onDamaged(LivingEntity attacker, LivingEntity target, DamageSource source, Ref<Float> amount, boolean ismob, boolean remote) {
        return true;
    }

    //攻击技能
    default boolean onAttack(LivingEntity attacker, LivingEntity target, DamageSource source, Ref<Float> amount, boolean ismob, boolean remote) {
        return true;
    }

    //对自己的死亡技能
    default boolean onDeath(LivingEntity attacker, LivingEntity target, DamageSource source, boolean ismob, boolean remote) {
        return true;
    }
}
